package com.imooc.security.app;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

/**
 * 6.2.10 oauth2资源服务器配置
 * 加了这个等于把app定义成资源服务器，访问资源的时候要先通过认证
 */
@Configuration
@EnableResourceServer
/**
 * 6.2.11 通过restlet client模拟认证获取token，然后模拟请求资源服务器(只有用token才能访问)
 * GET http://127.0.0.1/user/me
 * HEADERS:
 * Authorization: bearer b9e5de3a-945f-443f-838f-296490ebd9ec
 */
public class ImoocResourceServerConfig {
	
}
